import Vue from 'vue'
import Router from 'vue-router'

//今日界面
import Today from '../views/Today'
import Duanlian from '../views/Today/duanlian.vue'
import Schedule from '../views/Today/schedule.vue'
import Remote from '../views/remote/index.vue'
//import Udd from '../views/Today/udd.vue'
import NoneResult from '../views/Today/noneresult'


//课程界面
import Courses from '../views/course'
import Plan from '../views/course/plan.vue'
import Allcourse from '../views/course/allcourse.vue'
import Plan_Detail from '../views/course/plan_detail.vue'
import Course_Detail from '../views/course/course_detail.vue'

//商城界面
import Mall from '../views/mall'


//我的界面
import User from '../views/user'
import Edit from '../views/user/edit.vue'
import Coupon from '../views/user/coupon.vue'
import Allweekly from '../views/user/allweekly.vue'
import Weekly from '../views/user/weekly.vue'
import Money from '../views/user/money.vue'
import Jianshen from '../views/user/jianshen.vue'
import Collect from '../views/user/collect.vue'
import Gender from '../views/user/gender.vue'
import Height from '../views/user/height.vue'
import Mingxi from '../views/user/mingxi.vue'
import Result from "../views/user/result.vue"

// 周报绘图表
import Chart from '../views/user/LineChart-e.vue'



//u3d跳转
import U3D from '../views/u3d.vue';

Vue.use(Router);

export default new Router({
    mode: 'history',
    history: true, // 这里不能使用history模式
    saveScrollPosition: false, // 不保存滚动位置
    routes: [
        { path: '/', redirect: '/today' },
        //今日
        { path: '/today', name: 'today', component: Today, meta: { title: "今日" } },
        { path: '/today/schedule', name: 'schedule', component: Schedule, meta: { title: "课程表" } },
        { path: '/today/noneresult', name: 'noneresult', component: NoneResult, meta: { title: "课程结果" } },
		    { path: '/remote', name: 'remote', component: Remote, meta: { title: "遙控器" } },
//		{ path: '/udd', name: 'udd', component: Udd, meta: { title: "登录" } },

        //课程
        { path: '/course', name: 'course', component: Courses, meta: { title: "课程" } },
        { path: '/today/plan/:date', name: 'plan', component: Plan, meta: { title: "全部计划" } },
        { path: '/course/allcourse', name: 'allcourse', component: Allcourse, meta: { title: "全部课程" } },
        { path: '/today/plan_detail/:id/:date/:name', name: 'plan_detail', component: Plan_Detail, meta: { title: "计划介绍" } },
        { path: '/course/course_detail/:id/', name: 'course_detail', component: Course_Detail, meta: { title: "课程介绍" } },


        //商城
        { path: '/mall', name: 'mall', component: Mall, meta: { title: "商城" } },


        //我
        { path: '/user', name: 'user', component: User, meta: { title: "我" } },
        { path: '/user/edit', name: 'edit', component: Edit, meta: { title: "个人资料" } },
        { path: '/user/money', name: 'money', component: Money, meta: { title: "我的钱包" } },
        { path: '/user/coupon', name: 'coupon', component: Coupon, meta: { title: "优惠券" } },
        { path: '/user/allweekly', name: 'allweekly', component: Allweekly, meta: { title: '周报' } },
        { path: '/user/weekly/:id', name: 'weekly', component: Weekly, meta: { title: "周报详情" } },
        { path: '/user/jianshen', name: 'jianshen', component: Jianshen, meta: { title: "健身记录" } },
        { path: '/user/jianshen/result/:title/:id/:name', name: 'result', component: Result },
        { path: '/user/collect', name: 'collect', component: Collect, meta: { title: "我的收藏" } },
        { path: '/user/gender', name: 'gender', component: Gender, meta: { title: "个人信息" } },
        { path: '/user/edit/mingxi', name: 'mingxi', component: Mingxi, meta: { title: '明细' } },
        //周报绘制图表
        //{ path: '/user/chart', name: 'chart', component: Chart, meta: { title: '动作分析' } },



        // u3d跳转
        { path: '/unity/:id/login', name: 'u3d', component: U3D, meta: { title: "设备登陆" } },

    ]
})